home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / TUTORIAL.BIN / DateTimeField.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-01-30  |  1.6 KB  |  37 lines

  1. package symantec.itools.db.net;
  2.  
  3. import java.io.DataInputStream;
  4. import java.io.DataOutputStream;
  5. import java.io.IOException;
  6. import symjava.sql.SQLException;
  7.  
  8. abstract class DateTimeField extends Field {
  9.    void read(DataInputStream is) throws SQLException, IOException, ErrorException {
  10.       super.read(is);
  11.       if (!super._null) {
  12.          this.readData(is);
  13.       }
  14.  
  15.       ServerObject obj = (ServerObject)NetClass.getNextObject(is);
  16.       if (obj.getType() != 50) {
  17.          ((ServerObject)this).onObjectError(obj);
  18.       }
  19.  
  20.    }
  21.  
  22.    void write(DataOutputStream os) throws IOException {
  23.       super.write(os);
  24.       this.writeData(os);
  25.       EOT eot = new EOT();
  26.       eot.write(os);
  27.    }
  28.  
  29.    void readData(DataInputStream is) throws SQLException, IOException, ErrorException {
  30.       throw new IOException("Internal Error: Method not implemented");
  31.    }
  32.  
  33.    void writeData(DataOutputStream os) throws IOException {
  34.       throw new IOException("Internal Error: Method not implemented");
  35.    }
  36. }
  37.